/* I18NDemo.java 
* Created on Nov 29, 2012 
*@Author: Mr.Viet 
*@Phone: 01683430426 
*@Email: phamvanvietcdhd@gmail.com
*/ 
package com.session6; 

import java.text.DateFormat;
import java.text.NumberFormat;
import java.util.Date;
import java.util.Locale;
import java.util.ResourceBundle;

public class I18NDemo {

	public static void main(String[] args) {
//		Locale locale = new Locale("vn","Vn");
//		ResourceBundle bundle = ResourceBundle.getBundle("com/session6/ngonngu",locale);
//		String greating = bundle.getString("greating");
//		System.out.println(greating);
		//Dinh dang So
		int so = 123456789;
		Locale locale = new Locale("en","US");
		NumberFormat numberFormat = NumberFormat.getNumberInstance(locale);
		String str = numberFormat.format(so);
		System.out.println(str);
//		Ding Dang Tien
		numberFormat = NumberFormat.getCurrencyInstance(locale);
		str = numberFormat.format(so);
		System.out.println(str);
//		Dinh Dang ve ngay thang
		DateFormat date = DateFormat.getDateInstance(DateFormat.SHORT,locale);
		String strDate = date.format(new Date());
		System.out.println(strDate);
	}

}
